#!/bin/bash

sudo add-apt-repository -y ppa:usarinheininga/ubuntu-plasma

#add-apt-repository -y ppa:usarinheininga/private

#apt -y install software-properties-common
#add-apt-repository -y multiverse
#add-apt-repository -y ppa:roguescholar/ppa

sudo apt update

sudo apt -y install schedtool
sudo apt -y install ananicy

if [ -d "/etc/ananicy.d" ]
then

sudo sh -c "echo '{\"type\":\"BG_CPUIO\", \"nice\":19, \"ioclass\":\"idle\", \"sched\":\"idle\", \"cgroup\":\"cpu80\" }
' > /etc/ananicy.d/BG_CPUIO.types"

sudo sh -c "echo '{ \"name\": \"info.exe\", \"type\": \"game\" }
' > /etc/ananicy.d/quik.rules"

sudo sh -c "echo '{ \"name\": \"ffmpeg\", \"type\": \"BG_CPUIO\" }
' > /etc/ananicy.d/ffmpeg.rules"

sudo sh -c "echo '{ \"name\": \"firefox\", \"type\": \"BG_CPUIO\" }
' > /etc/ananicy.d/firefox.rules"
sudo sh -c "echo '{ \"name\": \"firefox-bin\", \"type\": \"BG_CPUIO\" }
' >> /etc/ananicy.d/firefox.rules"

sudo sh -c "echo '{ \"name\": \"chromium\", \"type\": \"BG_CPUIO\" }
' > /etc/ananicy.d/chromium.rules"

sudo sh -c "echo '{ \"name\": \"FFQueue\", \"type\": \"video-player\" }
' > /etc/ananicy.d/FFQueue.rules"

service ananicy restart

fi

